{$type}_upload_iframe_src
Filter HookDescription
Filters the upload iframe source URL for a specific media type. The dynamic portion of the hook name, `$type`, refers to the type of media uploaded. Possible hook names include: - `image_upload_iframe_src` - `media_upload_iframe_src`Hook Information
File Location |
wp-admin/includes/media.php
View on GitHub
|
Hook Type | Filter |
Line Number | 729 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$upload_iframe_src
|
The upload iframe source URL. |
Usage Examples
Basic Usage
<?php
// Hook into {$type}_upload_iframe_src
add_filter('{$type}_upload_iframe_src', 'my_custom_filter', 10, 1);
function my_custom_filter($upload_iframe_src) {
// Your custom filtering logic here
return $upload_iframe_src;
}
Source Code Context
wp-admin/includes/media.php:729
- How this hook is used in WordPress core
<?php
724 *
725 * @since 3.0.0
726 *
727 * @param string $upload_iframe_src The upload iframe source URL.
728 */
729 $upload_iframe_src = apply_filters( "{$type}_upload_iframe_src", $upload_iframe_src );
730
731 return add_query_arg( 'TB_iframe', true, $upload_iframe_src );
732 }
733
734 /**
PHP Documentation
<?php
/**
* Filters the upload iframe source URL for a specific media type.
*
* The dynamic portion of the hook name, `$type`, refers to the type
* of media uploaded.
*
* Possible hook names include:
*
* - `image_upload_iframe_src`
* - `media_upload_iframe_src`
*
* @since 3.0.0
*
* @param string $upload_iframe_src The upload iframe source URL.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/media.php
Related Hooks
Related hooks will be displayed here in future updates.